<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">

<head th:replace="admin/_fragments_after :: head(~{::title})">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link href="http://cdn.bootcss.com/highlight.js/8.0/styles/monokai_sublime.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../static/css/my.css" th:href="@{/css/my.css}">
    <title>博客发布</title>
</head>

<body class="m-bloght">
    <!--导航-->
    <nav th:replace="admin/_fragments_after :: menu(2)" id="nav" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
        <div class="ui container">
            <div class="ui inverted secondary stackable menu">
                <h2 class="ui teal header item">DyBlogs后台</h2>
                <a href="#" class="m-item item m-mobile-hide m-text-mini"><i class="home icon"></i>首页</a>
                <a href="#" class="active red m-item item m-mobile-hide m-text-mini"><i class="idea icon"></i>博客</a>
                <a href="#" class="m-item item m-mobile-hide m-text-mini"><i class="idea icon"></i>分类</a>
                <a href="#" class="m-item item m-mobile-hide m-text-mini"><i class="tags icon"></i>标签</a>
                <div class="right m-item m-mobile-hide menu">
                    <div class="ui dropdown item">
                        <div class="text">
                            <img src="../../static/images/dy.jpg" th:src="@{/images/dy.jpg}" alt="" class="ui avatar image">
                            丁宇
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" class="item">注销</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--目录图标-->
        <!--menu_toggle按钮事件，让导航在手机端可以点击展开-->
        <a href="#" class="ui menu_toggle black icon button m-top-right m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
    </nav>
    <!--二级导航-->
    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a href="#" class="teal active item">发布</a>
                <a href="#" class="item">列表</a>
            </div>
        </div>
    </div>
    <br>
    <br>
    <!--中间内容-->
    <div class="m-container">
        <!--container自适应-->
        <div class="ui stackable container">
            <form id="form" action="#" method="POST" class="ui form">
                <input type="hidden" name="published">
                <div class="required field">
                    <div class="ui left labeled input">
                        <!--compact自适应文字宽度-->
                        <div class="ui selection compact teal basic dropdown label">
                            <input type="hidden" name="flag" value="原创">
                            <i class="dropdown icon"></i>
                            <div class="text">原创</div>
                            <div class="menu">
                                <div class="item" data-value="原创">原创</div>
                                <div class="item" data-value="转载">转载</div>
                                <div class="item" data-value="翻译">翻译</div>
                            </div>
                        </div>
                        <input type="text" name="title" placeholder="标题">
                    </div>
                    <!--警告内容提示-->
                    <div class="ui error message">

                    </div>
                </div>
                <div class="required field">
                    <div id="div1">
                        <!-- <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p> -->
                    </div>
                    <textarea placeholder="编译后的内容" name="content" id="text1" cols="30" rows="10"></textarea>
                </div>
                <div class="two fields">
                    <div class="required field">
                        <div class="ui left labeled action input">
                            <label class="ui compact teal basic label">分类</label>
                            <div class="ui selection fluid dropdown">
                                <input type="hidden" name="typeName">
                                <i class="dropdown icon"></i>
                                <div class="default text">分类</div>
                                <div id="types" class="menu">
<!--                                    <div class="item" data-value="个人生活">个人生活</div>-->
<!--                                    <div class="item" data-value="学习">学习</div>-->
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui left labeled action input">
                            <label class="ui compact teal basic label">标签</label>
                            <div class="ui selection fluid multiple search dropdown">
                                <input type="hidden" name="tag">
                                <i class="dropdown icon"></i>
                                <div class="default text">标签</div>
                                <div id="tags" class="menu">
<!--                                    <div class="item" data-value="Java">Java</div>-->
<!--                                    <div class="item" data-value="SpringBoot">SpringBoot</div>-->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="required field">
                    <div class="ui left labeled input">
                        <label class="ui teal basic label">首图</label>
                        <input type="text" name="firstPicture" placeholder="首图引用地址">
                    </div>
                </div>
                <div class="required field">
                    <textarea name="description" placeholder="博客描述..." maxlength="200"></textarea>
                </div>
                <div class="inline fields">
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="recommend" name="recommend" checked class="hidden">
                            <label for="recommend">推荐</label>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="shareStatement" name="shareStatement" class="hidden">
                            <label for="shareStatement">转载声明</label>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="appreciation" name="appreciation" class="hidden">
                            <label for="appreciation">赞赏</label>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="commentabled" name="commentabled" class="hidden">
                            <label for="commentabled">评论</label>
                        </div>
                    </div>
                </div>

                <div class="ui right aligned container">
                    <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button>
                    <button id="save-bth" class="ui secondary submit button">保存</button>
                    <button id="publish-bth" class="ui teal submit button">发布</button>
                </div>
            </form>
        </div>
    </div>
    <br>
    <br>
    <br>
    <!--底部footer-->
    <footer th:replace="admin/_fragments_after :: footer" class="ui inverted vertical segment m-padded-tb-massive">
        <div class="ui center aligned container">
            <!--布局16份,3337-->
            <div class="ui inverted divided stackable grid">
                <div class="three wide column">
                    <div class="ui inverted link list">
                        <div class="item">
                            <img src="../../static/images/dymp.jpg" th:src="@{/images/dymp.jpg}" class="ui rounded image" alt="" style="width: 100px;">
                        </div>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                    <!--竖着的列表-->
                    <div class="ui inverted link list">
                        <a href="#" class="item">用户故事</a>
                        <a href="#" class="item">用户故事</a>
                        <a href="#" class="item">用户故事</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                    <!--竖着的列表-->
                    <div class="ui inverted link list">
                        <a href="#" class="item">Email：dyinin@qq.com</a>
                        <a href="#" class="item">QQ:2985922950</a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">dingyu</h4>
                    <!--竖着的列表-->
                    <div class="ui inverted link list m-text-thin m-text-spaced m-opacity-mini">
                        <p>这是我的个人博客</p>
                    </div>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright © 2020-2021 DingYu Designed by DingYu</p>
        </div>
    </footer>
    <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js"></script>
    <script src="http://cdn.bootcss.com/highlight.js/8.0/highlight.min.js"></script>
    <script src="../../static/js/editon.js" th:src="@{/js/editon.js}"></script>
    <script src="../../static/js/bloginput.js" th:src="@{/js/bloginput.js}"></script>
    <script>
        $(".menu_toggle").click(function () {
            $(".m-item").toggleClass("m-mobile-hide");
        })
        /**头像**/
        $('.ui.dropdown').dropdown({
            on: "click"
        })
        /**表单验证**/
        $(".ui.form").form({
            fields: {
                title: {
                    identifier: 'title',
                    rules: [{
                        type: 'empty',
                        prompt: '标题：请输入博客标题！'
                    }]
                },
                content: {
                    identifier: 'content',
                    rules: [{
                        type: 'empty',
                        prompt: '内容：请输入博客内容！'
                    }]
                },
                typeName: {
                    identifier: 'typeName',
                    rules: [{
                        type: 'empty',
                        prompt: '标签：请输入博客分类！'
                    }]
                },
                firstPicture: {
                    identifier: 'firstPicture',
                    rules: [{
                        type: 'empty',
                        prompt: '标签：请输入博客首图！'
                    }]
                }
            }
        });
    </script>
</body>

</html>